import { Module } from 'vuex'

interface State {
  form: formInfo //基本数据
}

interface formInfo {
  stackNo: string
  levelNo: string
  locationNo: string
  imsCode: string
  areaCode: string
  palletCode: string
  imsInventoryDetailList: any[]
}

const store: Module<State, unknown> = {
  namespaced: true,
  state() {
    return {
      form: {
        stackNo: '',
        levelNo: '',
        locationNo: '',
        imsCode: '',
        areaCode: '',
        palletCode: '',
        imsInventoryDetailList: [],
      },
    }
  },
  getters: {
    getFormInfo(state) {
      return state.form
    },
  },
  mutations: {
    setFromInfo(state, value) {
      state.form = value
    },
  },
  actions: {},
  modules: {},
}

export default store
